local jianglie = fk.CreateSkill{
  name = "lingling__jianglie",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["lingling__jianglie"] = "江烈",
  [":lingling__jianglie"] = "锁定技，当你受到伤害后，你选择视为对一名其他角色使用火【杀】或【水淹七军】。",

  ["#lingling__jianglie-invoke"] = "江烈：视为使用火【杀】或【水淹七军】",
}

jianglie:addEffect(fk.Damaged, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(jianglie.name) and
      table.find({"fire__slash", "ling__drowning"}, function (name)
        return player:canUse(Fk:cloneCard(name), { bypass_times = true })
      end)
  end,
  on_use = function (self, event, target, player, data)
    player.room:askToUseVirtualCard(player, {
      name = {"fire__slash", "ling__drowning"},
      skill_name = jianglie.name,
      prompt = "#lingling__jianglie-invoke",
      cancelable = false,
      extra_data = {
        bypass_times = true,
        extraUse = true,
      },
    })
  end,
})

return jianglie
